<!-- /**
 * 多选
 * @author 蔡文琦 2020-04-23
 *
 -->



<template>
    <div class="checkbox">  
        <input type="checkbox" 
        :checked="checked" 
        :name="radioName" 
        :class="checked" 
        :questionOrderNum="questionOrderNum" 
        :contentOrderNum="contentOrderNum"
        :questionContent="questionContent">
        <label class="iconfont"></label>
    </div> 

</template>
<script>
import "./checkbox.less";
 
export default {
    name:'checkbox',
    props:{
        radioName: {
			type: String, 
			default: ''  //默认为radio
        },
        questionOrderNum: {
            type: String, 
            default: ''  //默认为radio
        },
        contentOrderNum: {
            type: String, 
            default: ''  //默认为radio
        },
        questionContent: {
            type: String, 
            default: ''  //默认为radio
        }
    },

    data() {
    	return{
	        isChecked: '', //默认为空
            checked: ''
	    };
    },

    watch : {

        //监听isChecked，改变checked状态
        isChecked : {
            handler(newName, oldName){
                //改变时调用changeButton
                this.checked = newName;
            }
        }
    }

}
</script>